import production from './production'

export function getEnvConfig(profile: string = 'production') {
  const target = profile === 'production' ? production : require(`./${profile}.ts`)

  console.log(`\n================================\n`)
  console.log(`using profile: ${profile}\n`)
  Object.keys(target).forEach(key => {
    console.log(`   ${key}: ${target[key]}`)
  })
  console.log(`\n================================\n`)

  return {
    ...production,
    ...target,
  }
}
